package com.example.pattern.prototype;

import lombok.Data;
/**
 * 实现 Cloneable 接口的原型类
 *
 * @author FM_南风
 * @date 2024/6/23
 */
@Data
public class Shape  implements Cloneable {
    private String type;

    @Override
    public Shape clone() {
        try {
            return (Shape) super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
